Bug 535526 - updateiconcache.c: using open/close without prototype
authorTor Lillqvist <tml@novell.com>
Thu, 29 May 2008 18:22:38 +0000 (18:22 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 29 May 2008 18:22:38 +0000 (18:22 +0000)
2008-05-29  Tor Lillqvist  <tml@novell.com>

Bug 535526 - updateiconcache.c: using open/close without prototype

* gtk/updateiconcache.c: Include <io.h> if _MSC_VER. Also, use
g_utime() instead of utime() for UTF-8 pathname support on Windows
when available.

svn path=/trunk/; revision=20238

ChangeLog
gtk/updateiconcache.c

index d68a6a8bb9f9e5f2ed5bb0d6d80aa22ecc305493..97dbccecad302e43381193cae878b8edf4be0b44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-29  Tor Lillqvist  <tml@novell.com>
+
+       Bug 535526 - updateiconcache.c: using open/close without prototype
+
+       * gtk/updateiconcache.c: Include <io.h> if _MSC_VER. Also, use
+       g_utime() instead of utime() for UTF-8 pathname support on Windows
+       when available.
+
 2008-05-29  Jan Arne Petersen  <jpetersen@jpetersen.org>
 
        Bug 56355 – GtkLabel - Not all changes propagate correctly
index 15fc7ca80af1fafcdf736d9ace79666b12576ae4..4d8ce82106ddce2c206393bbad17a99d759bed45 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 #include <errno.h>
 #ifdef _MSC_VER
+#include <io.h>
 #include <sys/utime.h>
 #else
 #include <utime.h>
@@ -1547,8 +1548,12 @@ build_cache (const gchar *path)
 
   utime_buf.actime = path_stat.st_atime;
   utime_buf.modtime = cache_stat.st_mtime;
+#if GLIB_CHECK_VERSION (2, 17, 1)
+  g_utime (path, &utime_buf);
+#else
   utime (path, &utime_buf);
-  
+#endif
+
   if (!quiet)
     g_printerr (_("Cache file created successfully.\n"));
 }